<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <script src="./react18/react.development.js"></script>
    <script src="./react18/react-dom.development.js"></script>
  </head>
  <body>
    <div id="app"></div>
    <script>
      const vDOM = React.createElement("h1", {}, "hello world");
      console.log(vDOM);
      var tDOM = document.createElement("h1");
      console.dir(tDOM);

      /* 
        <div class="box">
          <p>hello</p>
          <h1 id="header">我是头部</h1>
        </div>
        
      */
      const cDOMEx = {
        //最外层div  tag名
        tag: "div",
        props: {
          //类名
          class: "box",
        },
        children: [
          //子节点
          {
            tag: "p",
            props: {},
            children: "hello",
          },
          {
            tag: "h1",
            props: {
              id: "header",
            },
            children: "我是头部",
          },
        ],
      };
    </script>
  </body>
</html>
